home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls088.hpux.Z / tls088.hpux / lib / vtcl / tests / input.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  526 b   |  29 lines

  1. # CVS $Id: input.tcl,v 1.3 1995/02/03 16:54:52 zibi Exp $
  2. #
  3. # This test that wstcl will work with even connecting to 
  4. # wserver.
  5. #
  6. # To test type the following
  7. #    cat /etc/termcap | wstcl input.tcl
  8. # You should see the file scrolling on the screen
  9. proc echoCB {id} {
  10.      set count [gets $id line]
  11.  
  12.      if { $count == -1 } {
  13.     echo "\n\nPASSED input.tcl"
  14.     exit 0
  15.      }
  16.      
  17.      puts stdout "." nonewline
  18.  
  19.      VtRemoveInput $id
  20.      VtAddInput $id echoCB
  21. }
  22.  
  23. set f [open /etc/termcap]
  24.  
  25. VtAddInput $f echoCB
  26.  
  27. VtMainLoop
  28.